﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using AcctrueWMS.Foundation.DAL;
namespace AcctruePMS.Bll.Manager
{
     public class ProjectQuestionManager
    {
         /// <summary>
         /// 项目报告报警
         /// 当项目报告中的有问题在期望解决时间内没有关闭的话，则所属的报告要进行报警
         /// </summary>
         /// <param name="projectGUID">项目报告所属的ID </param>
         /// <returns></returns>
         public DataTable ProjectQuestionAlerm(string projectGUID) {
             string sql = "select repotGUID from dbo.projectSolution where repotGuid in (select repotGUID from dbo.projectQuestion where projectGUID='" + projectGUID + "') and expectSolveTime<dateadd(d,-1,dateadd(d,1,convert(datetime,Convert(varchar(10),getDate(),120),120)))  and ((questionState<>'05' and questionState<>'04') or questionState is null)";
             return WMSqlExcuter.ExecuteDataTable(sql);
         }
    }
}
